#ifndef __ARC_TYPE_H__
#define __ARC_TYPE_H__

/*the type for the protected mode*/
typedef  struct struct_gdtdescriptor
         {
             U2B limit0;
             U2B base0;
             U1B base1;
             U1B pdplstype0;
             U1B gdb0avllimit1;
             U1B base2;
         }GDTDESCRIPTOR;

typedef  struct struct_gdtptr
         {
             U2B limit0;
             U2B base0;
             U2B base1;
             U2B pat; 
         }GDTPTR;

typedef  struct struct_gdtptr IDTPTR;

typedef  struct struct_gate
         {
             U2B offset0;
             U2B selector0;
             U1B three0paramcount0;
             U1B pdplstype0;
             U2B offset1;
         }GATE;

typedef  unsigned short SELECTOR;

typedef  struct struct_tss
         {
            U2B previoustsslink;
            U2B reserved0;
            U4B esp0;
            U2B ss0;
            U2B reserved1;
            U4B esp1;
            U2B ss1;
            U2B reserved2;
            U4B esp2;
            U2B ss2;
            U2B reserved3;
            U4B gr3pdbr;
            U4B eip;
            U4B eflags;
            U4B eax;
            U4B ecx;
            U4B edx;
            U4B ebx;
            U4B esp;
            U4B ebp;
            U4B esi;
            U4B edi;
            U2B es;
            U2B reserved4;
            U2B cs;
            U2B reserved5;
            U2B ss;
            U2B reserved6;
            U2B ds;
            U2B reserved7;
            U2B fs;
            U2B reserved8;
            U2B gs;
            U2B reserved9;
            U2B ldtselector;
            U2B reserved10;
            U2B trap;
            U2B iobitmapbase;
         }TSS;  

typedef  struct struct_kernelparameter
         {
           U4B  p1;
           U4B  p2;
           U4B  p3;
           U4B  p4;
           U4B  p5;
           U4B  p6;
           U4B  p7;
           U4B  p8;
         }KERNELPARAMETER;
typedef  struct struct_kernelparameter*  PKERNELPARAMETER;
typedef  struct struct_stackframe   /*80 Bytes*/
         {
             U2B  gs;
             U2B  fs;  
             U2B  ds;
             U2B  es; 
            
             U4B  cr3;
             U4B  cr0; 
             U4B  tss_esp0;
             U4B  tss_ss0;

             U4B  eax;
             U4B  ecx;            
             U4B  edx;
             U4B  ebx;            
             U4B  ignore_esp;
             U4B  ebp;            
             U4B  esi;
             U4B  edi;
                         
             U4B  errorcode;
             U4B  eip;            
             U4B  cs;
             U4B  eflags;
             U4B  esp;
             U4B  ss;
         }STACKFRAME;
typedef struct struct_atacmd
        {
            U1B devicecontrol;
            U1B features;
            U1B sectorcount;
            U1B lbalow;
            U1B lbamid;
            U1B lbahigh;
            U1B device;
            U1B command;
        }ATACMD;
typedef struct struct_atacmd* PATACMD;
#endif
